.class public Lde/dealdoktor/app/activities/TopDealsDetails;
.super Lde/dealdoktor/app/activities/SuperDetails;
.source "TopDealsDetails.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lde/dealdoktor/app/activities/TopDealsDetails$DealPagerAdapter;
    }
.end annotation


# instance fields
.field private dealAdapter:Lde/dealdoktor/app/activities/TopDealsDetails$DealPagerAdapter;

.field private dealPager:Landroid/support/v4/view/ViewPager;


# direct methods
.method public constructor <init>()V
    .locals 0

    .prologue
    .line 12
    invoke-direct {p0}, Lde/dealdoktor/app/activities/SuperDetails;-><init>()V

    return-void
.end method


# virtual methods
.method protected onCreate(Landroid/os/Bundle;)V
    .locals 3
    .parameter "savedInstanceState"

    .prologue
    .line 19
    invoke-virtual {p0}, Lde/dealdoktor/app/activities/TopDealsDetails;->getIntent()Landroid/content/Intent;

    move-result-object v0

    const-string v1, "postId"

    const/4 v2, 0x0

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I

    move-result v0

    iput v0, p0, Lde/dealdoktor/app/activities/TopDealsDetails;->currentPostIndex:I

    .line 20
    sget-object v0, Lde/dealdoktor/app/App;->topDeals:Ljava/util/ArrayList;

    iget v1, p0, Lde/dealdoktor/app/activities/TopDealsDetails;->currentPostIndex:I

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lde/dealdoktor/app/data/PostDAO;

    invoke-super {p0, p1, v0}, Lde/dealdoktor/app/activities/SuperDetails;->onCreate(Landroid/os/Bundle;Lde/dealdoktor/app/data/PostDAO;)V

    .line 22
    new-instance v0, Lde/dealdoktor/app/activities/TopDealsDetails$DealPagerAdapter;

    invoke-virtual {p0}, Lde/dealdoktor/app/activities/TopDealsDetails;->getSupportFragmentManager()Landroid/support/v4/app/FragmentManager;

    move-result-object v1

    invoke-direct {v0, v1}, Lde/dealdoktor/app/activities/TopDealsDetails$DealPagerAdapter;-><init>(Landroid/support/v4/app/FragmentManager;)V

    iput-object v0, p0, Lde/dealdoktor/app/activities/TopDealsDetails;->dealAdapter:Lde/dealdoktor/app/activities/TopDealsDetails$DealPagerAdapter;

    .line 24
    const v0, 0x7f0b0006

    invoke-virtual {p0, v0}, Lde/dealdoktor/app/activities/TopDealsDetails;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/support/v4/view/ViewPager;

    iput-object v0, p0, Lde/dealdoktor/app/activities/TopDealsDetails;->dealPager:Landroid/support/v4/view/ViewPager;

    .line 25
    iget-object v0, p0, Lde/dealdoktor/app/activities/TopDealsDetails;->dealPager:Landroid/support/v4/view/ViewPager;

    iget-object v1, p0, Lde/dealdoktor/app/activities/TopDealsDetails;->dealAdapter:Lde/dealdoktor/app/activities/TopDealsDetails$DealPagerAdapter;

    invoke-virtual {v0, v1}, Landroid/support/v4/view/ViewPager;->setAdapter(Landroid/support/v4/view/PagerAdapter;)V

    .line 27
    iget-object v0, p0, Lde/dealdoktor/app/activities/TopDealsDetails;->dealPager:Landroid/support/v4/view/ViewPager;

    iget v1, p0, Lde/dealdoktor/app/activities/TopDealsDetails;->currentPostIndex:I

    invoke-virtual {v0, v1}, Landroid/support/v4/view/ViewPager;->setCurrentItem(I)V

    .line 28
    iget-object v0, p0, Lde/dealdoktor/app/activities/TopDealsDetails;->dealPager:Landroid/support/v4/view/ViewPager;

    new-instance v1, Lde/dealdoktor/app/activities/TopDealsDetails$1;

    invoke-direct {v1, p0}, Lde/dealdoktor/app/activities/TopDealsDetails$1;-><init>(Lde/dealdoktor/app/activities/TopDealsDetails;)V

    invoke-virtual {v0, v1}, Landroid/support/v4/view/ViewPager;->setOnPageChangeListener(Landroid/support/v4/view/ViewPager$OnPageChangeListener;)V

    .line 46
    return-void
.end method
